package com.yuyou.fn.tradingservice.mapper;

import com.github.wens.mybatisplus.mapper.AutoMapper;
import com.yuyou.fn.tradingservice.entity.ServiceProduct;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 *
 * ServiceProduct 表数据库控制层接口
 *
 */
public interface ServiceProductMapper extends AutoMapper<ServiceProduct,Long> {

    @Update("update service_product set category_names=replace(category_names,#{oldCategoryName}, #{newCategoryName}) where category_id LIKE '%${categoryId}%'")
    public void updateCategoryNames(@Param("oldCategoryName") String oldCategoryName,@Param("newCategoryName")String newCategoryName,@Param("categoryId") Long  categoryId);
}